Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DocDiff: Cache remote content #441

Merged
merged 15 commits into from
Dec 5, 2024
Merged

DocDiff: Cache remote content #441

merged 15 commits into from
Dec 5, 2024

Conversation

ericholscher
Copy link
Member

Fixes #103

@ericholscher ericholscher requested review from humitos and a team as code owners November 19, 2024 23:01
src/docdiff.js Outdated Show resolved Hide resolved
@ericholscher
Copy link
Member Author

Realized we were "double triggering" the addon when the passed the GET arg, and now moved the state of enabled/disabled into the Addon.

src/events.js Outdated Show resolved Hide resolved
src/hotkeys.js Outdated Show resolved Hide resolved
@ericholscher
Copy link
Member Author

This should be working now 🎉

Copy link
Contributor

@agjohnson agjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updates look good here 👍

Tests might be a good next addition, I'd tackle those in a separate PR though.

Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good with some small modifications.

src/docdiff.js Show resolved Hide resolved
src/hotkeys.js Outdated Show resolved Hide resolved
Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work! 🚀 💯

Comment on lines +124 to +125
// This code isn't used until we show a UI,
// and even then we'll want to trigger events to match state?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this code was used in the render() method from above originally when I tried using a slider. We never deployed that, so we can probably remove that and this chunk as well.

@ericholscher ericholscher merged commit 92dfd88 into main Dec 5, 2024
4 checks passed
@ericholscher ericholscher deleted the cache-docdiff branch December 5, 2024 21:45
humitos added a commit that referenced this pull request Dec 9, 2024
HotKeys has to be initialized before DocDiff because when
`?readthedocs-diff=true` DocDiff triggers an event that HotKeys has to listen to
to update its internal state.

* Related #645
* Related #441
ericholscher pushed a commit that referenced this pull request Dec 9, 2024
HotKeys has to be initialized before DocDiff because when
`?readthedocs-diff=true` DocDiff triggers an event that HotKeys has to
listen to to update its internal state.

* Related #465
* Related #441
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docdiff: cache the page downloaded
3 participants